﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace University.Workshop.Model
{
    [Table("User")]
    public class User
    {
        [Key]
        [ForeignKey("Person")]
        public string UserId { get; set; }

        public int Role { get; set; }
        public string Login { get; set; }
        public string Password { get; set; }
        public bool IsActive { get; set; }
        //public DateTime SystemDate { get; set; }

        [NotMapped]
        public string RetryPassword { get; set; }
        [NotMapped]
        public string OldLogin { get; set; }
        [NotMapped]
        public string OldPassword { get; set; }

        public virtual Person Person { get; set; }
        //public ICollection<WaterSupply> WaterSupplies { get; set; }
        //public ICollection<CollectControl> CollectControls { get; set; }
        //public ICollection<Spend> Spends { get; set; }
        //public ICollection<WaterReadingControl> WaterReadingControls { get; set; }
    }
}
